<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/WEB-INF/jsp/common/taglib.jsp" %>
<div class="sidebar" id="sidebar">
    <div class="sidebar-shortcuts" id="sidebar-shortcuts">
        <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
            <button class="btn btn-success">
                <i class="ace-icon fa fa-signal"></i>
            </button>

            <button class="btn btn-info">
                <i class="ace-icon fa fa-pencil"></i>
            </button>

            <button class="btn btn-warning">
                <i class="ace-icon fa fa-users"></i>
            </button>

            <button class="btn btn-danger">
                <i class="ace-icon fa fa-cogs"></i>
            </button>
        </div>

        <div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
            <span class="btn btn-success"></span>

            <span class="btn btn-info"></span>

            <span class="btn btn-warning"></span>

            <span class="btn btn-danger"></span>
        </div>
    </div>
    <ul class="nav nav-list">
        <c:forEach items="${menuList}" var="menu">
            <li>
                <c:set var="_url" value="${ctxRoot}${menu.url}"/>
                <a href="${(not empty menu.url)?_url:'javascript:void(0)'}" class="dropdown-toggle">
                    <i class="${menu.cssClass}"></i>
              <span class="menu-text">
                      ${menu.title}
              </span>
                    <b class="arrow icon-angle-down"></b>
                </a>
                <c:if test="${not empty menu.subMenu}">
                    <ul class="submenu">
                        <c:forEach items="${menu.subMenu}" var="sub">
                            <li class="<c:if test="${sub.isActive}">active</c:if>">
                                <c:set var="_url" value="${ctxRoot}${sub.url}"/>
                                <a href="${(not empty sub.url)?_url:'javascript:void(0)'}">
                                    <i class="icon-double-angle-right"></i>
                                        ${sub.title}
                                </a>
                            </li>
                        </c:forEach>
                    </ul>
                </c:if>
            </li>
        </c:forEach>
    </ul>
    <div class="sidebar-collapse" id="sidebar-collapse">
        <i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
    </div>
    <script type="text/javascript">
        try {
            ace.settings.check('sidebar', 'collapsed')
        } catch (e) {
        }
        $(".submenu li.active").parent("ul").parent("li").addClass("active").addClass("open");
    </script>
</div>